<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<meta name="apple-touch-fullscreen" content="YES">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" href="/Public/projects/meeting/css/meetbase.css">
<title>会议登录</title>
</head>
<body>
<div class="divLogin">
	<input type="text" class="loginInput" placeholder="请输入您的用户名" id="username">
    <input type="password" class="loginInput borderTopLogin" placeholder="请输入您的密码" id="password">
</div>
<span id="spanLoginTips"></span>
<input type="button" value="登&nbsp;&nbsp;&nbsp;&nbsp;录" class="loginBtn colourwaybg" id="login">
<div class="logintipsBox" id="logintipsBox">登录成功</div>
<script src="/Public/projects/meeting/js/jquery-1.7.1.min.js"></script>
<script src="/Public/projects/meeting/js/common.js"></script>
<script type="text/javascript">
$(function() {
    $("#login").click(function() {
        var oError = document.getElementById("spanLoginTips");
        var userName = $("#username").val();
        var password = $("#password").val();
        var isNotError = true;
        if(userName==""){
            oError.innerHTML = "请输入用户名";
            isNotError = false;
            $("#username").focus();
            return;
        }
        if(password==""){
            oError.innerHTML = "请输入密码";
            isNotError = false;
            $("#password").focus();
            return;
        }
        $.ajax({
            type: "POST",
            url:"/Wap/Applications/meeting_check",
            dataType: "json",
             data: {
                 user_name:userName,
                 passwd:password
             },
              success: function(json){
                if(json['code'] == true){
                    $("#logintipsBox").text("登录成功");
                   $("#logintipsBox").css("display","block");
                     setTimeout(function () {
                            $("#logintipsBox").hide();
                            window.location.href = "/Wap/Applications/meeting_activity";
                        }, 2800);
                }else if(json['code'] == false) {
                    $("#logintipsBox").text("用户名或密码错误");
                   $("#logintipsBox").css("display","block");
                     setTimeout(function () {
                            $("#logintipsBox").hide();
                        }, 2800);
                }else{
                    $("#logintipsBox").text("登录失败");
                   $("#logintipsBox").css("display","block");
                     setTimeout(function () {
                            $("#logintipsBox").hide();
                        }, 2800);
                }

            }

        });

    });
});
</script>
</body>
</html>
